package com.bawei.mall.user.controller;

import com.bawei.common.core.domain.R;
import com.bawei.mall.user.domain.CusUser;
import com.bawei.mall.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：HaoYunde
 * @Package：com.bawei.mall.user.controller
 * @Project：mall_cloud
 * @name：UserController
 * @Date：2024/6/27 15:28
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;


    @GetMapping("/findCusUserByName")
    public R<CusUser> findCusUserByName(@RequestParam("username") String username){
        CusUser user=userService.findCusUserByName(username);
        return  R.ok(user);
    }


}
